package com.feri.rbacsys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.feri.rbacsys.entity.Returnorder;
import com.feri.rbacsys.vo.ReturnAmounVo;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @author 神经质的木子李
 * @description 针对表【t_returnorder】的数据库操作Mapper
 * @createDate 2023-03-28 15:31:29
 * @Entity com.feri.rbacsys.entity.Returnorder
 */
public interface ReturnorderMapper extends BaseMapper<Returnorder> {
    @Update("update t_returnorder set flag=1 where id=#{id}")
    int audito(int id);

    @Select("select sum(return_stock) returnAmount from t_returnorder where product_id=#{productId}")
    ReturnAmounVo getAmout(Integer productId);
}




